package com.guguskins.back.entity.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.guguskins.back.entity.GuInventory;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("gu_inventory")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class GuInventoryVo extends Model<GuInventory>
{
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "inventory_id", type = IdType.AUTO)
    private Long inventoryId;

    /**
     * user表id
     */
    private Long inventoryUserId;

    /**
     * steamId
     */
    private String inventorySteamId;

    /**
     * 1 box 2 goods 3 prop
     */
    private Integer inventoryType;

    /**
     * 来源
     */
    private Integer inventorySource;

    /**
     * 来源Id
     */
    private Long inventorySourceId;

    /**
     * 库存物品id
     */
    private Long inventoryItemId;

    /**
     * 饰品价格
     */
    private BigDecimal inventoryItemPrice;

    /**
     * 0 无效 1 库存 2 兑换咕币 3 提现 4 合同材料 5 提取
     */
    private Integer inventoryState;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime inventoryCreateTime;

    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime inventoryUpdateTime;


    @Override
    protected Serializable pkVal() {
        return this.inventoryId;
    }
}
